﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

    <!-- Meta -->
    <meta name="description" content="旅游管理系统"/>
    <meta name="author" content="WY"/>

    <link rel="shortcut icon" th:href="@{/picture/favicon.ico}" type="image/x-icon"/>
    <title>旅游管理系统</title>

    <!-- vendor css -->
    <link th:href="@{/admin/css/font-awesome.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/ionicons.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/perfect-scrollbar.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/rickshaw.min.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/github.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/jquery.datatables.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/select2.min.css}" rel="stylesheet"/>

    <!-- Starlight CSS -->
    <link rel="stylesheet" th:href="@{/admin/css/starlight.css}"/>
</head>

<body>

<!-- ########## START: LEFT PANEL ########## -->
<div class="sl-logo"><a href=""><img th:src="@{/admin/picture/mt_logo_wh.jpg}" style="width: 30px; height: 30px;"/>
    <span
            style="font-size: 18px">旅游管理系统</span></a></div>
<div class="sl-sideleft">
    <!--<div class="input-group input-group-search">-->
    <!--<input type="search" name="search" class="form-control" placeholder="Search"/>-->
    <!--<span class="input-group-btn">-->
    <!--<button class="btn"><i class="fa fa-search"></i></button>-->
    <!--</span>&lt;!&ndash; input-group-btn &ndash;&gt;-->
    <!--</div>&lt;!&ndash; input-group &ndash;&gt;-->

    <label class="sidebar-label">导航栏</label>
    <div class="sl-sideleft-menu">
        <a href="#" class="sl-menu-link active show-sub">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">旅游资源</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column">
            <li class="nav-item"><a th:href="@{/manager/travelResources(type=${1})}"
                                    th:class="${type eq 1} ? 'nav-link active' : 'nav-link '">景点</a></li>
            <li class="nav-item"><a th:href="@{/manager/travelResources(type=${2})}"
                                    th:class="${type eq 2} ? 'nav-link active' : 'nav-link '">名胜古迹</a></li>
            <li class="nav-item"><a th:href="@{/manager/travelResources(type=${3})}"
                                    th:class="${type eq 3} ? 'nav-link active' : 'nav-link '">公园</a></li>
            <li class="nav-item"><a th:href="@{/manager/travelResources(type=${4})}"
                                    th:class="${type eq 4} ? 'nav-link active' : 'nav-link '">博物馆</a></li>
        </ul>

        <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">服务设施</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column">
            <li class="nav-item"><a th:href="@{/manager/service(type=${1})}"
                                    th:class="${type eq 1} ? 'nav-link active' : 'nav-link '">旅团</a></li>
            <li class="nav-item"><a th:href="@{/manager/service(type=${2})}"
                                    th:class="${type eq 2} ? 'nav-link active' : 'nav-link '">旅馆</a></li>
            <li class="nav-item"><a th:href="@{/manager/service(type=${3})}"
                                    th:class="${type eq 3} ? 'nav-link active' : 'nav-link '">车站</a></li>
            <li class="nav-item"><a th:href="@{/manager/service(type=${4})}"
                                    th:class="${type eq 4} ? 'nav-link active' : 'nav-link '">监督机构</a></li>
        </ul>

        <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">购物信息</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column">
            <li class="nav-item"><a th:href="@{/manager/shop(type=${1})}"
                                    th:class="${type eq 1} ? 'nav-link active' : 'nav-link '">商城</a></li>
            <li class="nav-item"><a th:href="@{/manager/shop(type=${2})}"
                                    th:class="${type eq 2} ? 'nav-link active' : 'nav-link '">超市</a></li>
            <li class="nav-item"><a th:href="@{/manager/shop(type=${3})}"
                                    th:class="${type eq 3} ? 'nav-link active' : 'nav-link '">名优特产</a></li>
        </ul>

        <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">查看预订</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column">
            <li class="nav-item"><a th:href="@{/manager/order(flag=${0})}"
                                    th:class="${flag eq 0} ? 'nav-link active' : 'nav-link '">未接受</a></li>
            <li class="nav-item"><a th:href="@{/manager/order(flag=${1})}"
                                    th:class="${flag eq 1} ? 'nav-link active' : 'nav-link '">已接收</a></li>

        </ul>



<!--        <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">线路管理</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div>&lt;!&ndash; menu-item &ndash;&gt;
        </a>&lt;!&ndash; sl-menu-link &ndash;&gt;
        <ul class="sl-menu-sub nav flex-column">
            <li class="nav-item"><a th:href="@{/manager/route(type=${0})}"
                                    th:class="${type eq 0} ? 'nav-link active' : 'nav-link '">购物信息</a></li>
            <li class="nav-item"><a th:href="@{/manager/route(type=${1})}"
                                    th:class="${type eq 1} ? 'nav-link active' : 'nav-link '">服务设施</a></li>
        </ul>-->
    </div>
</div>
<!-- ########## END: LEFT PANEL ########## -->

<!-- ########## START: HEAD PANEL ########## -->
<div class="sl-header">
    <div class="sl-header-left">
        <div class="navicon-left hidden-md-down"><a id="btnLeftMenu" href=""><i class="icon ion-navicon-round"></i></a>
        </div>
        <div class="navicon-left hidden-lg-up"><a id="btnLeftMenuMobile" href=""><i class="icon ion-navicon-round"></i></a>
        </div>
    </div><!-- sl-header-left -->
    <div class="sl-header-right">
        <nav class="nav">
            <div class="dropdown">
                <a href="" class="nav-link nav-link-profile" data-toggle="dropdown">
                    <span class="logged-name">信息技术系 | 信息技术系</span>
                    <img th:src="@{/picture/mt_logo_wh.jpg}" class="wd-32 rounded-circle" alt=""/>
                </a>
                <div class="dropdown-menu dropdown-menu-header wd-200">
                    <ul class="list-unstyled user-profile-nav">
                        <li><a href=""><i class="icon ion-ios-person-outline"></i> Edit Profile</a></li>
                        <li><a href=""><i class="icon ion-ios-gear-outline"></i> Settings</a></li>
                        <li><a href=""><i class="icon ion-ios-download-outline"></i> Downloads</a></li>
                        <li><a href=""><i class="icon ion-ios-star-outline"></i> Favorites</a></li>
                        <li><a href=""><i class="icon ion-ios-folder-outline"></i> Collections</a></li>
                        <li><a th:href="@{/logout}"><i class="icon ion-power"></i> Sign Out</a></li>
                    </ul>
                </div><!-- dropdown-menu -->
            </div><!-- dropdown -->
        </nav>
        <div class="navicon-right">

        </div><!-- navicon-right -->
    </div><!-- sl-header-right -->
</div><!-- sl-header -->
<!-- ########## END: HEAD PANEL ########## -->

<!-- ########## START: RIGHT PANEL ########## -->
<!-- ########## END: RIGHT PANEL ########## -->

<!-- ########## START: MAIN PANEL ########## -->
<div class="sl-mainpanel">
    <nav class="breadcrumb sl-breadcrumb">
        <a class="breadcrumb-item" href="index.html">旅游管理系统</a>
        <span class="breadcrumb-item active">活动项列表</span>
    </nav>

    <div class="sl-pagebody">

        <div class="card pd-20 pd-sm-40">
            <h6 class="card-body-title">活动项目列表</h6>
            <p class="mg-b-20 mg-sm-b-30">The list of all activities.</p>
            <form th:action="@{/activity/list}" method="get">
                <div class="row">
                    <div class="col-lg-8 mg-b-10">
                        <div class="input-group">
                            <input type="text" class="form-control clo-sm-6 col-md-4" th:name="keywords"
                                   th:placeholder="按活动名称搜索..."/>
                            <input type="hidden" id="type" value="name"/>
                            <span class="input-group-btn mg-r-20">
                                <button class="btn bd bg-white tx-gray-600" type="submit"><i class="fa fa-search"></i>
                                </button>
                            </span>
                            <a class="btn btn-info active btn-block col-lg-3" th:href="@{/saleRecordForm}">新增活动项目</a>
                        </div><!-- input-group -->
                    </div><!-- col-4 -->
                </div><!-- row -->
            </form>

            <div class="table-responsive">
                <table class="table table-hover table-bordered mg-b-0">
                    <thead class="bg-info">
                    <tr>
                        <th class="wd-25p" style="text-align: center">活动项目名称</th>
                        <th class="wd-30p" style="text-align: center">活动日期</th>
                        <th class="wd-15p" style="text-align: center">操作</th>
                        <th class="wd-10p" style="text-align: center">状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td style="text-align: center"><a th:href="@{/aa}" th:text="aa"></a>
                        </td>
                        <!--   <td style="text-align: center" th:text="${#dates.format(act.startTime,'yyyy/MM/dd')}+ ' -- ' +${#dates.format(act.endTime,'yyyy/MM/dd')}">
                              2018/03/01--2018/03/28
                          </td> -->
                        <td style="text-align: center"><a th:href="@{/bb}">查看详情</a></td>
                        <!-- <td style="text-align: center"><span style="color: green" th:if="${new java.util.Date()} &gt; ${act.startTime} and ${new java.util.Date()} &lt; ${act.endTime}">有效</span>
                            <span style="color: red" th:unless="${new java.util.Date()} &gt; ${act.startTime} and ${new java.util.Date()} &lt; ${act.endTime}">已过期</span>
                        </td> -->
                    </tr>
                    </tbody>
                </table>
            </div><!-- table-responsive -->

            <!--页码 start-->
            <!--   <div class="ht-80 bd d-flex align-items-center justify-content-center">
                  <nav aria-label="Page navigation">
                      <ul class="pagination pagination-basic mg-b-0">

                          <li th:class="${page.pageNo eq 1} ? 'page-item' : 'page-item'">
                              <a class="page-link" aria-label="First" th:if="${page.pageNo eq 1}" href="#">
                                  <i class="fa fa-angle-double-left"></i>
                              </a>
                              <a class="page-link" aria-label="First" th:if="${page.pageNo ne 1} and ${page.pageNo &lt; 10}" th:href="@{/activity/list(pageNo=1)}">
                                  <i class="fa fa-angle-double-left"></i>
                              </a>
                              <a class="page-link" aria-label="First" th:if="${page.pageNo &gt; 11}" th:href="@{/activity/list(pageNo=${page.pageNo-10})}">
                                  <i class="fa fa-angle-double-left"></i>
                              </a>
                          </li>

                          <li th:class="${page.pageNo eq 1} ? 'page-item' : 'page-item'">
                              <a class="page-link" aria-label="previous" th:if="${page.pageNo eq 1}" href="#">
                                  <i class="fa fa-angle-left"></i>
                              </a>
                              <a class="page-link" aria-label="previous" th:unless="${page.pageNo eq 1}" th:href="@{/activity/list(pageNo=${page.pageNo-1})}">
                                  <i class="fa fa-angle-left"></i>
                              </a>
                          </li>

                          <li th:if="${page.pageTotal eq 0}" class="page-item active"><a class="page-link" href="#">1</a></li>
                          <li th:if="${page.pageTotal ne 0}" th:each="currentPage : ${#numbers.sequence(1, page.pageTotal)}" th:class="${currentPage eq page.pageNo} ? 'page-item active' : 'page-item'">
                              <a th:if="${page.pageNo eq currentPage}" class="page-link" href="#" th:text="${currentPage}">1</a>
                              <a th:if="${page.pageNo ne currentPage} and ${currentPage ne 0}" class="page-link" th:href="@{/activity/list(pageNo=${currentPage})}" th:text="${currentPage}">1</a>
                          </li>

                          <li class="page-item">
                              <a class="page-link" aria-label="Next" th:if="${page.pageNo eq page.pageTotal}" href="#">
                                  <i class="fa fa-angle-right"></i>
                              </a>
                              <a class="page-link" aria-label="Next" th:if="${page.pageTotal eq 0}" href="#">
                                  <i class="fa fa-angle-right"></i>
                              </a>
                              <a class="page-link" aria-label="Next" th:if="${page.pageNo lt page.pageTotal}" th:href="@{/activity/list(pageNo=${page.pageNo} + 1)}">
                                  <i class="fa fa-angle-right"></i>
                              </a>
                          </li>

                          <li class="page-item">
                              <a class="page-link" aria-label="Last" th:if="${page.pageNo eq page.pageTotal}" href="#">
                                  <i class="fa fa-angle-double-right"></i>
                              </a>
                              <a class="page-link" aria-label="Last" th:if="${page.pageNo ne page.pageTotal} and ${pageTotal ge (page.pageNo+10)}" th:href="@{/activity/list/(pageNo=${page.pageNo} + 10)}">
                                  <i class="fa fa-angle-double-right"></i>
                              </a>
                              <a class="page-link" aria-label="Last" th:if="${page.pageNo ne page.pageTotal} and ${pageTotal lt (page.pageNo+10)}" th:href="@{/activity/list/(pageNo=${page.pageTotal})}">
                                  <i class="fa fa-angle-double-right"></i>
                              </a>
                          </li>

                      </ul>
                  </nav>
              </div> -->
            <!--页码 end-->
        </div><!-- card -->
    </div><!-- sl-pagebody -->
    <footer class="sl-footer">
        <div class="footer-left">
            <div class="mg-b-2">Copyright &copy; 2018. 中原工学院信息商务学院. All Rights Reserved.</div>
        </div>
        <div class="footer-right d-flex align-items-center">Made by 信息技术系.</div>
    </footer>
</div><!-- sl-mainpanel -->
<!-- ########## END: MAIN PANEL ########## -->


<script th:src="@{/admin/js/jquery.js}"></script>
<script th:src="@{/admin/js/popper.js}"></script>
<script th:src="@{/admin/js/bootstrap.js}"></script>
<script th:src="@{/admin/js/perfect-scrollbar.jquery.js}"></script>
<script th:src="@{/admin/js/highlight.pack.js}"></script>
<script th:src="@{/admin/js/starlight.js}"></script>

<script>
    /*<![CDATA[*/

    function valiForm() {
        var keywords = $('input[name="keywords"]');
        var patternName = /^[\u4E00-\u9FA5]{1,6}$/;
        var patternPhone = /^1[34578]\d{9}$/;
        var patternIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
        if (keywords.val() == null || ($.trim(keywords.val())) == "") {
            return false;
        } else if (patternName.test(keywords.val())) {
            // 关键字为姓名，置type为0.
            $('input[name="type"]').val("0");
        } else if (patternPhone.test(keywords.val())) {
            // 关键字为姓名，置type为1.
            $('input[name="type"]').val("1");
        } else if (patternIdCard.test(keywords.val())) {
            // 关键字为姓名，置type为2.
            $('input[name="type"]').val("2");
        } else if (keywords.val() != null || ($.trim(keywords.val())) != "") {
            alert("type=" + $('input[name="type"]').val() + ",keywords=" + keywords.val());
            return true;
        }
        return false;
    }

    /*]]>*/
</script>

</body>
</html>
